import { stringify } from 'qs';
import request from '../utils/request';

export async function urlsSummaryData(params) {
  return request(`/analytics/url_summary.json?${stringify(params, { indices: false })}`);
}

export async function getUrlData(params) {
  return request(`/analytics/urls.json?${stringify(params, { indices: false })}`);
}

export async function urlHistogram(params) {
  return request(`/analytics/url_histogram.json?${stringify(params, { indices: false })}`);
}

export async function urlHistogramItem(params) {
  return request(`/analytics/url_histogram_item.json?${stringify(params, { indices: false })}`);
}
